home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / mit-press / 10mitprb.sty < prev    next >
Text File  |  1991-08-03  |  24KB  |  591 lines

  1. %
  2. % This file helps define the MIT-Press-Book document style, created and
  3. % maintained by EB@OZ.  Please do not modify it.
  4. %
  5. % Modified from REPORT DOCUMENT STYLE -- Released 23 September 1985
  6. %    for LaTeX version 2.09
  7. % which was
  8. % Copyright (C) 1985 by Leslie Lamport
  9.  
  10. %  ****************************************
  11. %  *               FONTS                  *
  12. %  ****************************************
  13. %
  14.  
  15. \lineskip 1pt            % \lineskip is 1pt for all font sizes.
  16. \normallineskip 1pt
  17. \def\baselinestretch{1}  % see also \programspacing below
  18.  
  19. % LaTex (LFONTS.TEX) leaves out some font sizes that we'll be using.
  20. % Therefore we redefine \vipt and \viipt to remove the corresponding
  21. % \@subfont calls.  However, if we do this we must also create
  22. % pxl font files of the proper magnifications for our printers.
  23. % Since we've created new pxl font files for small \tt sizes only,
  24. % we'll remove \@subfont calls for \tt alone.
  25.  
  26. \def\vipt{\textfont\z@\sixrm 
  27.   \scriptfont\z@\sixrm \scriptscriptfont\z@\sixrm
  28. \textfont\@ne\sixmi \scriptfont\@ne\sixmi \scriptscriptfont\@ne\sixmi
  29. \textfont\tw@\sixsy \scriptfont\tw@\sixsy \scriptscriptfont\tw@\sixsy
  30. \textfont\thr@@\tenex \scriptfont\thr@@\tenex \scriptscriptfont\thr@@\tenex
  31. \def\prm{\fam\z@\sixrm}%
  32. \def\unboldmath{\everymath{}\everydisplay{}\@nomath
  33.   \unboldmath\@boldfalse}\@boldfalse
  34. \def\boldmath{\@subfont\boldmath\unboldmath}%
  35. \def\pit{\@subfont\it\rm}%
  36. \def\psl{\@subfont\sl\rm}%
  37. \def\pbf{\@getfont\pbf\bffam\@vipt{ambx7 scaled857}}%
  38. \def\ptt{\@getfont\ptt\ttfam\@vipt{amtt8 at 6pt}}%      %% NEW
  39. \def\psf{\@subfont\sf\rm}%
  40. \def\psc{\@subfont\sc\rm}%
  41. \def\ly{\fam\lyfam\sixly}\textfont\lyfam\sixly 
  42.     \scriptfont\lyfam\sixly \scriptscriptfont\lyfam\sixly 
  43. \@setstrut\rm}
  44.  
  45. \def\viipt{\textfont\z@\sevrm 
  46.   \scriptfont\z@\sixrm \scriptscriptfont\z@\fivrm
  47. \textfont\@ne\sevmi \scriptfont\@ne\fivmi \scriptscriptfont\@ne\fivmi
  48. \textfont\tw@\sevsy \scriptfont\tw@\fivsy \scriptscriptfont\tw@\fivsy
  49. \textfont\thr@@\tenex \scriptfont\thr@@\tenex \scriptscriptfont\thr@@\tenex
  50. \def\prm{\fam\z@\sevrm}%
  51. \def\unboldmath{\everymath{}\everydisplay{}\@nomath
  52. \unboldmath\@boldfalse}\@boldfalse
  53. \def\boldmath{\@subfont\boldmath\unboldmath}%
  54. \def\pit{\fam\itfam\sevit}\textfont\itfam\sevit 
  55.    \scriptfont\itfam\sevit \scriptscriptfont\itfam\sevit 
  56. \def\psl{\@subfont\sl\it}%
  57. \def\pbf{\@getfont\pbf\bffam\@viipt{ambx7}}%
  58. \def\ptt{\@getfont\ptt\ttfam\@vipt{amtt8 at 7pt}}%      %% NEW
  59. \def\psf{\@subfont\sf\rm}%
  60. \def\psc{\@subfont\sc\rm}%
  61. \def\ly{\fam\lyfam\sevly}\textfont\lyfam\sevly 
  62.     \scriptfont\lyfam\fivly \scriptscriptfont\lyfam\fivly 
  63. \@setstrut \rm}
  64.  
  65. % Each size-changing command \SIZE executes the command
  66. %        \@setsize\SIZE{BASELINESKIP}\FONTSIZE\@FONTSIZE
  67. % where:
  68. %   BASELINESKIP = Normal value of \baselineskip for that size.  (Actual 
  69. %                  value will be \baselinestretch * BASELINESKIP.)
  70. %
  71. %  \FONTSIZE     = Name of font-size command.  The currently available
  72. %                  (preloaded) font sizes are: \vpt (5pt), \vipt (6pt),
  73. %                  \viipt (etc.), \viiipt, \ixpt, \xpt, \xipt, \xiipt,
  74. %                  \xivpt, \xviipt, \xxpt, \xxvpt.
  75. %  \@FONTSIZE    = The same as the font-size command except with an
  76. %                  '@' in front---e.g., if \FONTSIZE = \xivpt then
  77. %                  \@FONTSIZE = \@xivpt.
  78. %
  79. % For reasons of efficiency that needn't concern the designer,
  80. % the document style defines \@normalsize instead of \normalsize .  This is
  81. % done only for \normalsize, not for any other size-changing commands.
  82.  
  83. \def\@normalsize{\@setsize\normalsize{13pt}\xpt\@xpt
  84. \abovedisplayskip 10pt plus2pt minus5pt%
  85. \belowdisplayskip \abovedisplayskip
  86. \abovedisplayshortskip  \z@ plus3pt%   
  87. \belowdisplayshortskip  6pt plus3pt minus3pt}
  88.  
  89. \def\small{\@setsize\small{11pt}\ixpt\@ixpt
  90. \abovedisplayskip 8.5pt plus 3pt minus 4pt%
  91. \belowdisplayskip \abovedisplayskip
  92. \abovedisplayshortskip \z@ plus2pt%
  93. \belowdisplayshortskip 4pt plus2pt minus 2pt
  94. \def\@listi{\topsep 4pt plus 2pt minus 2pt\parsep 2pt plus 1pt minus 1pt
  95. \itemsep \parsep}}
  96.  
  97. % We add several sizes in between \small and \tiny.
  98. % They are mainly for use in typesetting large \tt programs
  99. % or traces; they are not standard.
  100. % In order, the sizes go \small \smaller \verysmall \quitesmall \tiny.
  101. %
  102. \def\smaller{\@setsize\smaller{10pt}\viiipt\@viiipt
  103. \abovedisplayskip 7.5pt plus 3pt minus 4pt%
  104. \belowdisplayskip \abovedisplayskip
  105. \abovedisplayshortskip \z@ plus2pt%
  106. \belowdisplayshortskip 4pt plus2pt minus 2pt
  107. \def\@listi{\topsep 3pt plus 2pt minus 2pt\parsep 2pt plus 1pt minus 1pt
  108. \itemsep \parsep}}
  109.  
  110. \def\verysmall{\@setsize\verysmall{9pt}\viipt\@viipt
  111. \abovedisplayskip 6.5pt plus 3pt minus 4pt%
  112. \belowdisplayskip \abovedisplayskip
  113. \abovedisplayshortskip \z@ plus2pt%
  114. \belowdisplayshortskip 4pt plus2pt minus 2pt
  115. \def\@listi{\topsep 3pt plus 2pt minus 2pt\parsep 2pt plus 1pt minus 1pt
  116. \itemsep \parsep}}
  117.  
  118. \def\tiny{\@setsize\tiny{8pt}\vipt\@vipt}
  119.  
  120. \def\footnotesize{\@setsize\footnotesize{9.5pt}\viiipt\@viiipt
  121. \abovedisplayskip 6pt plus 2pt minus 4pt%
  122. \belowdisplayskip \abovedisplayskip
  123. \abovedisplayshortskip \z@ plus 1pt%
  124. \belowdisplayshortskip 3pt plus 1pt minus 2pt
  125. \def\@listi{\topsep 3pt plus 1pt minus 1pt\parsep 2pt plus 1pt minus 1pt
  126. \itemsep \parsep}}
  127.  
  128. % This one is new in the MIT-Press-Book style; it's not used in the
  129. % REPORT style.
  130. \def\captionsize{\@setsize\captionsize{10pt}\ixpt\@ixpt
  131. \abovedisplayskip 6pt plus 2pt minus 4pt%
  132. \belowdisplayskip \abovedisplayskip
  133. \abovedisplayshortskip \z@ plus 1pt%
  134. \belowdisplayshortskip 3pt plus 1pt minus 2pt
  135. \def\@listi{\topsep 3pt plus 1pt minus 1pt\parsep 2pt plus 1pt minus 1pt
  136. \itemsep \parsep}}
  137.  
  138. % This one is new as well.  It's used in the 'program' environment.
  139. %
  140. \def\programspacing{\newbaselinestretch{0.75}}
  141.  
  142. \def\scriptsize{\@setsize\scriptsize{8pt}\viipt\@viipt}
  143. \def\large{\@setsize\large{14pt}\xiipt\@xiipt}
  144. \def\Large{\@setsize\Large{18pt}\xivpt\@xivpt}
  145. \def\LARGE{\@setsize\LARGE{22pt}\xviipt\@xviipt}
  146. \def\huge{\@setsize\huge{25pt}\xxpt\@xxpt}
  147. \def\Huge{\@setsize\Huge{30pt}\xxvpt\@xxvpt}
  148.  
  149. \normalsize  % Choose the normalsize font.
  150.  
  151. % PICTURE ENVIRONMENT BUG:
  152. %
  153. % Change \the\fontdimen8\tenlnw to a larger value so that
  154. % \thicklines will work better with horizontal and vertical
  155. % lines.  I don't know what's wrong here; it may be our
  156. % printers.
  157. %
  158.  
  159. \fontdimen8\tenlnw=1.0pt %% empirically determined value
  160.  
  161.  
  162. %  ****************************************
  163. %  *            PAGE LAYOUT               *
  164. %  ****************************************
  165. %
  166. % All margin dimensions measured from a point one inch from top and side
  167. % of page.  
  168.  
  169. % SIDE MARGINS:
  170. \oddsidemargin 56pt      %   Left margin on odd-numbered pages.
  171. \evensidemargin 56pt     %   Left margin on even-numbered pages.
  172. \marginparwidth 107pt    %   Width of marginal notes.
  173. \marginparsep 11pt       %   Horizontal space between outer margin and 
  174.                          %   marginal note
  175.  
  176.  
  177. % VERTICAL SPACING:        
  178.  
  179.                          % Top of page:
  180. \topmargin 27pt          %    Nominal distance from top of page to top of
  181.                          %    box containing running head.
  182. \headheight 12pt         %    Height of box containing running head.
  183. \headsep 24pt            %    Space between running head and text.
  184. % \topskip = 10pt        %    '\baselineskip' for first line of page.
  185.  
  186.                          % Bottom of page:
  187. \footheight 0pt          %    Height of box containing running foot.
  188. \footskip 0pt            %    Distance from baseline of box containing foot 
  189.                          %    to baseline of last line of text.
  190.  
  191.  
  192. % DIMENSION OF TEXT:
  193.  
  194. \textheight 500pt        % Height of text (including footnotes and figures, 
  195.                          % excluding running head and foot).
  196. \textwidth 334pt         % Width of text line.
  197.                          % For two-column mode: 
  198. \columnsep 10pt          %    Space between columns 
  199. \columnseprule 0pt       %    Width of rule between columns.
  200.  
  201. % Parameters used by the special table of contents format that's used
  202. % in the MIT-Press-Book style.
  203.  
  204. \newdimen\toc@leftwidth
  205. \toc@leftwidth 7.5pc
  206. \newdimen\toc@rightwidth
  207. \toc@rightwidth 18.7pc
  208. \newdimen\toc@colsep
  209. \toc@colsep .8pc
  210. \newdimen\toc@prechapterskip
  211. \toc@prechapterskip 20pt
  212. \newdimen\toc@postchapterskip
  213. \toc@postchapterskip 8pt
  214.  
  215. % A \raggedbottom command causes 'ragged bottom' pages: pages set to
  216. % natural height instead of being stretched to exactly \textheight.
  217.  
  218. % FOOTNOTES:
  219.  
  220. \footnotesep 6.65pt   % Height of strut placed at the beginning of every
  221.                       % footnote = height of normal \footnotesize strut,
  222.                       % so no extra space between footnotes.
  223.  
  224. \skip\footins 9pt plus 4pt minus 2pt  % Space between last line of text and 
  225.                                       % top of first footnote.
  226.  
  227. % CAPTIONSKIP -- Made a parameter in this document style.
  228.  
  229. \newdimen\precaptionskip
  230. \precaptionskip 0pt             % default is none
  231.  
  232. % FLOATS: (a float is something like a figure or table)
  233. %
  234. %  FOR FLOATS ON A TEXT PAGE:
  235. %
  236. %    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
  237. \floatsep 12pt plus 2pt minus 2pt        % Space between adjacent floats moved
  238.                                          % to top or bottom of text page.
  239. \textfloatsep 20pt plus 2pt minus 4pt    % Space between main text and floats
  240.                                          % at top or bottom of page.
  241. \intextsep 12pt plus 2pt minus 2pt       % Space between in-text figures and 
  242.                                          % text.
  243. \@maxsep 20pt                            % The maximum of \floatsep, 
  244.                                          % \textfloatsep and \intextsep (minus
  245.                                          % the stretch and shrink).
  246. %    TWO-COLUMN FLOATS IN TWO-COLUMN MODE:
  247. \dblfloatsep 12pt plus 2pt minus 2pt     % Same as \floatsep for double-column
  248.                                          % figures in two-column mode.
  249. \dbltextfloatsep 20pt plus 2pt minus 4pt % \textfloatsep for double-column 
  250.                                          % floats.
  251. \@dblmaxsep 20pt                         % The maximum of \dblfloatsep and 
  252.                                          % \dbltexfloatsep.
  253.  
  254. %  FOR FLOATS ON A SEPARATE FLOAT PAGE OR COLUMN:
  255. %    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
  256. \@fptop 0pt plus 1fil    % Stretch at top of float page/column. (Must be    
  257.                          % 0pt plus ...)                                    
  258. \@fpsep 8pt plus 2fil    % Space between floats on float page/column.       
  259. \@fpbot 0pt plus 1fil    % Stretch at bottom of float page/column. (Must be 
  260.                          % 0pt plus ... )                                   
  261.  
  262. %   DOUBLE-COLUMN FLOATS IN TWO-COLUMN MODE.
  263. \@dblfptop 0pt plus 1fil % Stretch at top of float page. (Must be 0pt plus ...)
  264. \@dblfpsep 8pt plus 2fil % Space between floats on float page.
  265. \@dblfpbot 0pt plus 1fil % Stretch at bottom of float page. (Must be 
  266.                          % 0pt plus ... )                                   
  267. % MARGINAL NOTES:
  268. %
  269. \marginparpush 5pt       % Minimum vertical separation between two marginal 
  270.                          % notes.
  271.  
  272.  
  273. %  ****************************************
  274. %  *           PARAGRAPHING               *
  275. %  ****************************************
  276. %
  277. \parskip 4.4pt plus 1pt            % Extra vertical space between paragraphs.
  278. \parindent 22pt                    % Width of paragraph indentation.
  279. \topsep 8pt plus 2pt minus 4pt     % Extra vertical space, in addition to 
  280.                                    % \parskip, added above and below list and
  281.                                    % paragraphing environments.
  282. \partopsep 2pt plus 1pt minus 1pt  % Extra vertical space, in addition to 
  283.                                    % \parskip and \topsep, added when user
  284.                                    % leaves blank line before environment.
  285. \itemsep 4pt plus 2pt minus 1pt    % Extra vertical space, in addition to
  286.                                    % \parskip, added between list items.
  287.  
  288. \invertedparindent\parindent       % This dimension is defined in the
  289.                                    % texlocal:invertedparagraphs file,
  290.                                    % which is read before this file is.
  291.  
  292. % The following page-breaking penalties are defined
  293.  
  294. \@lowpenalty   51      % Produced by \nopagebreak[1] or \nolinebreak[1]
  295. \@medpenalty  151      % Produced by \nopagebreak[2] or \nolinebreak[2]
  296. \@highpenalty 301      % Produced by \nopagebreak[3] or \nolinebreak[3]
  297.  
  298. \@beginparpenalty -\@lowpenalty    % Before a list or paragraph environment.
  299. \@endparpenalty   -\@lowpenalty    % After a list or paragraph environment.
  300. \@itempenalty     -\@lowpenalty    % Between list items.
  301.  
  302. % \clubpenalty         % 'Club line'  at bottom of page.
  303. % \widowpenalty        % 'Widow line' at top of page.
  304. % \displaywidowpenalty % Math display widow line.
  305. % \predisplaypenalty   % Breaking before a math display.
  306. % \postdisplaypenalty  % Breaking after a math display.
  307. % \interlinepenalty    % Breaking at a line within a paragraph.
  308. % \brokenpenalty       % Breaking after a hyphenated line.
  309.  
  310. \widowpenalty 10000
  311. \clubpenalty 10000
  312.  
  313.  
  314. %    ****************************************
  315. %    *        CHAPTERS AND SECTIONS         *
  316. %    ****************************************
  317. %
  318. %
  319.  
  320. \def\part{\cleardoublepageempty   % Starts new page.
  321.   \thispagestyle{empty}      % Page style of part page is 'empty'
  322.   \if@twocolumn              % IF two-column style
  323.      \onecolumn              %  THEN \onecolumn
  324.      \@tempswatrue           %       @tempswa := true
  325.     \else \@tempswafalse     %  ELSE @tempswa := false
  326.   \fi                        % FI
  327.   \bgroup\parindent 0pt\raggedright\secdef\@part\@spart}     
  328.  
  329. \def\@part[#1]#2{\ifnum \c@secnumdepth >-2\relax  % IF secnumdepth > -2
  330.         \refstepcounter{part}                     %   THEN step part counter
  331.         \addcontentsline{toc}{part}
  332.            {\protect\numberline{\thepart} #1}\else% ELSE add unnumbered line
  333.         \addcontentsline{toc}{part}{#1}\fi        % FI
  334.    \markboth{}{}
  335.    \ifnum \c@secnumdepth >-2\relax  % IF secnumdepth > -2
  336.       \@chapterheadlayout{Part \thepart:}{#1}\else
  337.       \@chapterheadlayout{}{#1}\fi
  338.    \@endpart}
  339.     
  340. % \@endpart finishes the part page
  341. %
  342. \def\@endpart{\par\egroup     % END centering 
  343.    \vfil\newpage              % End page with 1fil glue.
  344.    \if@twoside                % IF twoside printing
  345.        \hbox{}                %   THEN Produce totally blank page
  346.        \thispagestyle{empty}  
  347.        \newpage        
  348.    \fi                        % FI
  349.    \if@tempswa                % IF @tempswa = true       
  350.      \twocolumn               %   THEN \twocolumn 
  351.    \fi}                       % FI
  352.  
  353. \def\@spart#1{\@chapterheadlayout{}{#1}\@endpart}
  354.  
  355. % The chapter headings will be formatted as follows:
  356. %
  357. %     Chapter 27
  358. %     ---------------------------------------------
  359. %     Still Further Considerations
  360. %
  361. % The \@chapterheadlayout definition helps keep the line the same distance from
  362. % the top of the page and the text regardless of what happens.
  363. % However, things could be changed so that the text moves downward if
  364. % the chapter has a long title.
  365. %
  366. % A \chapter*{...} chapter DOES appear in the table of contents,
  367. % in this document style; however, it appears in a different format
  368. % from a normal chapter.
  369.  
  370. \def\@topchapterdecls{\parindent\z@\raggedright\Large\bf}
  371.  
  372. \def\@topchapterbox#1{\hbox{\vbox to 58pt{\vfill
  373.      \parbox[b]{\textwidth}{\raggedright\hyphenpenalty5000 #1}}}\par
  374.      \hbox to \textwidth{\hrulefill}}
  375.  
  376. \def\@bottomchapterbox#1{\hbox{}\par
  377.    \vbox to 65pt{\parbox[b]{\textwidth}{\raggedright\hyphenpenalty1000 #1}\vfill}}
  378.  
  379. \def\@chapterheadlayout#1#2{\@topchapterbox{#1}\@bottomchapterbox{#2}}
  380.  
  381. % \@makechapterhead {TEXT} : Makes the heading for the \chapter command.
  382. %
  383.  
  384. \def\@makechapterhead#1{             % Heading for \chapter command
  385.     \bgroup
  386.     \@topchapterdecls
  387.     % IF secnumdepth > -1 THEN
  388.     % print 'Chapter' and number.
  389.     \ifnum \c@secnumdepth >\m@ne
  390.       \@chapterheadlayout{\@chapapp\ \thechapter}{#1}\else
  391.       \@chapterheadlayout{}{#1}\fi
  392.     \nobreak
  393.     \egroup}
  394.  
  395. % \@makeschapterhead {TEXT} : Makes the heading for the \chapter* command.
  396. %
  397.  
  398. \def\@makeschapterhead#1{             % Heading for \chapter* command
  399.   \bgroup
  400.   \@topchapterdecls
  401.   \@chapterheadlayout{}{#1}\nobreak
  402.   \egroup}
  403.  
  404. % \secdef{UNSTARCMDS}{STARCMDS} :
  405. %    When defining a \chapter or \section command without using
  406. %    \@startsection, you can use \secdef as follows:
  407. %       \def\chapter { ... \secdef \CMDA \CMDB }
  408. %       \def\CMDA    [#1]#2{ ... }  % Command to define \chapter[...]{...}
  409. %       \def\CMDB    #1{ ... }      % Command to define \chapter*{...}
  410.  
  411. \def\chapter{\clearchapterpage  % Starts new page, possibly leaving a blank one.
  412.    \thispagestyle{empty}     % Page style of chapter page is empty
  413.    \global\@topnum\z@        % Prevents figures from going at top of page.
  414.    \@afterindentfalse        % Suppresses indent in first paragraph.  Change
  415.    \secdef\@chapter\@schapter}   % to \@afterindenttrue to have indent.
  416.  
  417. \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
  418.         \refstepcounter{chapter}
  419.         \typeout{Book \@chapapp\space\thechapter.}
  420.         \addcontentsline{toc}{chapter}{\protect
  421.         \numberline{\thechapter}#2}\else
  422.       \addcontentsline{toc}{chapter}{#1}\fi
  423.    \chaptermark{#1}
  424.    \addtocontents{lof}{\protect\addvspace{10pt}} % Adds between-chapter space
  425.    \addtocontents{lot}{\protect\addvspace{10pt}} % to lists of figs & tables.
  426.    \if@twocolumn                                 % Tests for two-column mode.  
  427.            \@topnewpage[\@makechapterhead{#2}]  
  428.      \else \@makechapterhead{#2}
  429.            \@afterheading                  % Routine called after chapter and
  430.      \fi}                                  % section heading.
  431.  
  432. % We arrange for \chapter* entries to appear in the table of contents, but
  433. % indicated with "schapter" rather than "chapter".
  434.  
  435. \def\@schapter#1{\addcontentsline{toc}{schapter}{#1}\if@twocolumn
  436.         \@topnewpage[\@makeschapterhead{#1}]
  437.         \else \@makeschapterhead{#1}\@afterheading\fi
  438.         \markboth{#1}{#1}}
  439.  
  440. % \chapter{...} isn't supposed to be used in the front matter;
  441. % \chapter*{...} is supposed to be used instead.
  442.  
  443. \def\front@chapter[#1]#2{\front@schapter{#2}}
  444.  
  445. \def\front@makeschapterhead#1{\bgroup      % Heading for \chapter* command in
  446.   \parindent 0pt\raggedright               % front matter
  447.   \large\uppercase{#1}\par\nobreak
  448.   \vspace{20pt}
  449.   \egroup
  450.   \@afterindenttrue
  451.   \@afterheading}
  452.  
  453.  
  454. % \@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE} 
  455. %            optional * [ALTHEADING]{HEADING}
  456. %    Generic command to start a section.  
  457. %    NAME       : e.g., 'subsection'
  458. %    LEVEL      : a number, denoting depth of section -- e.g., chapter=1,
  459. %                 section = 2, etc.  A section number will be printed if
  460. %                 and only if LEVEL < or = the value of the secnumdepth
  461. %                 counter.
  462. %    INDENT     : Indentation of heading from left margin
  463. %    BEFORESKIP : Absolute value = skip to leave above the heading.  
  464. %                 If negative, then paragraph indent of text following 
  465. %                 heading is suppressed.
  466. %    AFTERSKIP  : if positive, then skip to leave below heading,
  467. %                       else - skip to leave to right of run-in heading.
  468. %    STYLE      : commands to set style
  469. %  If '*' missing, then increments the counter.  If it is present, then
  470. %  there should be no [ALTHEADING] argument.  A sectioning command
  471. %  is normally defined to \@startsection + its first six arguments.
  472.  
  473. % In the MIT-Press-Book style, I've set up only chapters and sections
  474. % to suppress paragraph indentation -- not subsections.
  475.  
  476. \def\section{\@startsection{section}{1}{\z@}{-3.5ex plus -1ex minus 
  477.     -.2ex}{2.3ex plus .2ex}{\Large\bf\raggedright}}
  478. \def\subsection{\@startsection{subsection}{2}{\z@}{3.25ex plus 1ex minus 
  479.    .2ex}{1.5ex plus .2ex}{\large\bf\raggedright}}
  480. \def\subsubsection{\@startsection{subsubsection}{3}{\z@}{3.25ex plus
  481.  1ex minus .2ex}{1.5ex plus .2ex}{\large\sl\raggedright}}
  482. \def\paragraph{\@startsection
  483.      {paragraph}{4}{\z@}{3.25ex plus 1ex minus .2ex}{-1em}{\normalsize
  484.                                                            \sl\raggedright}}
  485. \def\subparagraph{\@startsection
  486.      {subparagraph}{4}{\parindent}{3.25ex plus 1ex minus 
  487.      .2ex}{-1em}{\normalsize\sl\raggedright}}
  488.  
  489. % Default initializations of \...mark commands.  (See below for their
  490. % use in defining page styles.
  491. %
  492.  
  493. \def\chaptermark#1{}
  494. % \def\sectionmark#1{}           % Preloaded definitions
  495. % \def\subsectionmark#1{}
  496. % \def\subsubsectionmark#1{}
  497. % \def\paragraphmark#1{}
  498. % \def\subparagraphmark#1{}
  499.  
  500. % APPENDIX
  501. %
  502. % The \appendix command must do the following:
  503. %    -- reset the chapter counter to zero
  504. %    -- set \@chapapp to Appendix (for messages)
  505. %    -- redefine the chapter counter to produce appendix numbers
  506. %    -- reset the section counter to zero
  507. %    -- redefine the \chapter command if appendix titles and headings are
  508. %       to look different from chapter titles and headings.
  509. %
  510. % In this document style, we also set the tocdepth counter to
  511. % zero so that sections of appendices will not go in the table
  512. % of contents.
  513. %
  514. % Also, we do a \clearpage in the \appendix command in this document
  515. % style.  Among other things, that allows us to do an \immediate\write
  516. % instead of a \write for the \addtocontents.
  517.  
  518. \def\appendix{\clearpage
  519.   \setcounter{chapter}{0}
  520.   \setcounter{section}{0}
  521.   \def\@chapapp{Appendix}
  522.   \bgroup
  523.   \let\latexwrite\write
  524.   \def\write{\immediate\latexwrite}
  525.   \addtocontents{toc}{\protect\@tocappendix}
  526.   \egroup
  527.   \def\thechapter{\Alph{chapter}}}
  528.  
  529. \def\@tocappendix{\def\@chapapp{Appendix}\setcounter{tocdepth}{0}}
  530.  
  531.  
  532.  
  533. % INDEX INDENTATION
  534.  
  535. \newlength\indexindent
  536. {\small \global\indexindent=0.6em}
  537.  
  538.  
  539. %    ****************************************
  540. %    *                LISTS                 *
  541. %    ****************************************
  542. %
  543.  
  544. % The following commands are used to set the default values for the list
  545. % environment's parameters. See the LaTeX manual for an explanation of
  546. % the meanings of the parameters.  Defaults for the list environment are
  547. % set as follows.  First, \rightmargin, \listparindent and \itemindent
  548. % are set to 0pt.  Then, for a Kth level list, the command \@listK is
  549. % called, where 'K' denotes 'i', 'ii', ... , 'vi'.  (I.e., \@listiii is
  550. % called for a third-level list.)  By convention, \@listK should set
  551. % \leftmargin to \leftmarginK.
  552. %
  553. % For efficiency, level-one list's values are defined at top level, and
  554. % \@listi is defined to set only \leftmargin.
  555.  
  556. \leftmargini 25pt
  557. \leftmarginii 22pt     % > \labelsep + width of '(m)'
  558. \leftmarginiii 18.7pt  % > \labelsep + width of 'vii.'
  559. \leftmarginiv 17pt     % > \labelsep + width of 'M.'
  560. \leftmarginv 10pt
  561. \leftmarginvi 10pt
  562.  
  563. \leftmargin\leftmargini
  564. \labelsep 5pt
  565. \labelwidth\leftmargini\advance\labelwidth-\labelsep
  566. \parsep 4pt plus 2pt minus 1pt
  567.  
  568. \def\@listi{\leftmargin\leftmargini}
  569.  
  570. \def\@listii{\leftmargin\leftmarginii
  571.    \labelwidth\leftmarginii\advance\labelwidth-\labelsep
  572.    \topsep 4pt plus 2pt minus 1pt
  573.    \parsep 2pt plus 1pt minus 1pt
  574.    \itemsep \parsep}
  575.  
  576. \def\@listiii{\leftmargin\leftmarginiii
  577.     \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
  578.     \topsep 2pt plus 1pt minus 1pt 
  579.     \parsep \z@ \partopsep 1pt plus 0pt minus 1pt
  580.     \itemsep \topsep}
  581.  
  582. \def\@listiv{\leftmargin\leftmarginiv
  583.      \labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
  584.  
  585. \def\@listv{\leftmargin\leftmarginv
  586.      \labelwidth\leftmarginv\advance\labelwidth-\labelsep}
  587.  
  588. \def\@listvi{\leftmargin\leftmarginvi
  589.      \labelwidth\leftmarginvi\advance\labelwidth-\labelsep}
  590.  
  591.